package weeny.recycle;

import java.util.Comparator;

@Deprecated
public class Pair<T>{
	public final T key;
	public final Number value;
	public Pair(T key, Number value) {
		this.key = key;
		this.value = value;
	}
	public static Comparator<Pair> ASCENDING = new Comparator<Pair>() {
		public int compare(Pair o1, Pair o2) {
			if (o1.value.doubleValue() < o2.value.doubleValue())
				return -1;
			else if (o1.value.doubleValue() > o2.value.doubleValue())
				return 1;
			else return 0;
		}
	};
	public static Comparator<Pair> DESCENDING = new Comparator<Pair>() {
		public int compare(Pair o1, Pair o2) {
			return 0-ASCENDING.compare(o1, o2);
		}

	};
}